package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @RequestMapping("/hi")
    public String sayhi(String name)
    {
        System.out.println("执行sayHi方法");
        return "hi"+name;
    }

    @RequestMapping("/hello")
    public  String hello()
    {
        System.out.println("执行hello方法");
        return "hello world！";
    }

}